package cn.com.sinosoft.exam;

import java.util.List;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import cn.com.sinosoft.exam.page.PageParamResolver;

/**
 * 
 * 数据交换主类
 * @author xl
 *
 */
@SpringBootApplication
@ComponentScan("cn.com.sinosoft.*")
@MapperScan("cn.com.sinosoft.exam.dao")
public class ExamApplication extends WebMvcConfigurerAdapter{
	
	/**
	 * 主方法
	 * @param args
	 */
	public static void main(String[] args) {
		SpringApplication.run(ExamApplication.class, args);
	}
	
	/**
	 * 参数解析器
	 */
	@Override
	public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
		super.addArgumentResolvers(argumentResolvers);
		argumentResolvers.add(new PageParamResolver());
	}

}
